package com.edu.imau.ManagerSeat;

import com.edu.imau.ParkingDao;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.ArrayList;
@WebServlet("/list3")
public class SeatServlet extends HttpServlet {
        private ParkingDao dao = new ParkingDao();
        protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
            //1:处理参数

            //2 调用model
            ArrayList<Seat> list = dao.getSeatAll();
            //3；展示数据View
            request.setAttribute("data3",list);
            request.getRequestDispatcher("seat.jsp").forward(request,response);
        }

}
